<%@ Register TagPrefix="skm" Namespace="FAQControls" Assembly="FAQControls" %>
<%@ Page language="c#" Codebehind="FAQAdmin.aspx.cs" AutoEventWireup="True" Inherits="Adge.Web.Faq.Admin.FAQAdmin" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>FAQ Administration</title>
		<LINK href="../FAQstyle.css" type="text/css" rel="stylesheet">
	</HEAD>
	<body MS_POSITIONING="FlowLayout">
		<form id="Form1" method="post" runat="server">
			<p><skm:LoginPanel id="LoginPanel1" runat="server" cssclass="faq_logout" /></p>
			<h1>
				FAQ Administration</h1>
			<div class="faq_breadcrumb"><a href="Default.aspx">skmFAQs.NET Administration</a> &gt; 
				FAQ Administration</div>
			<P>
				<asp:HyperLink Runat="server" NavigateUrl="CreateFAQ.aspx" id="lnkCreateFAQ">Create 
				a New FAQ</asp:HyperLink>
			</P>
			<H2>FAQs You've Created</H2>
			<asp:DataGrid id="dgOwnFAQs" runat="server" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
				BackColor="White" CellPadding="4" AllowSorting="True" AutoGenerateColumns="False" AllowPaging="True"
				DataKeyField="FAQID">
				<SelectedItemStyle Font-Bold="True" ForeColor="#663399" BackColor="#FFCC66"></SelectedItemStyle>
				<ItemStyle ForeColor="#330099" BackColor="White"></ItemStyle>
				<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" BackColor="#990000"></HeaderStyle>
				<FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
				<Columns>
					<asp:HyperLinkColumn Text="Edit" DataNavigateUrlField="FAQID" DataNavigateUrlFormatString="EditFAQ.aspx?ID={0}"></asp:HyperLinkColumn>
					<asp:HyperLinkColumn Text="Related FAQs" DataNavigateUrlField="FAQID" DataNavigateUrlFormatString="RelatedFAQs.aspx?ID={0}"></asp:HyperLinkColumn>
					<asp:ButtonColumn Text="Delete" CommandName="Delete"></asp:ButtonColumn>
					<asp:BoundColumn DataField="Question" SortExpression="Question" HeaderText="Question"></asp:BoundColumn>
					<asp:TemplateColumn HeaderText="Category">
						<ItemTemplate>
							<asp:DropDownList id="categories" runat="server" Enabled="False" DataTextField="Name" DataValueField="CategoryID"></asp:DropDownList>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:BoundColumn DataField="DateCreated" SortExpression="DateCreated" HeaderText="Created On" DataFormatString="{0:d}"></asp:BoundColumn>
					<asp:TemplateColumn HeaderText="Approved">
						<ItemStyle HorizontalAlign="Center"></ItemStyle>
						<ItemTemplate>
							<asp:CheckBox id=CheckBox1 runat="server" Enabled="False" Checked='<%# DataBinder.Eval(Container, "DataItem.Approved") %>'>
							</asp:CheckBox>
						</ItemTemplate>
					</asp:TemplateColumn>
				</Columns>
				<PagerStyle HorizontalAlign="Right" ForeColor="#330099" BackColor="#FFFFCC" Mode="NumericPages"></PagerStyle>
			</asp:DataGrid><asp:Label Runat="server" ID="noOwnFAQsMessage" Font-Italic="True">You have not created any FAQs.</asp:Label>
			<h2>FAQs You've Contributed To</h2>
			<P>
				<asp:DataGrid id="dgContributedFAQs" runat="server" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
					BackColor="White" CellPadding="4" AllowSorting="True" AutoGenerateColumns="False" AllowPaging="True"
					DataKeyField="FAQPartID">
					<SelectedItemStyle Font-Bold="True" ForeColor="#663399" BackColor="#FFCC66"></SelectedItemStyle>
					<ItemStyle ForeColor="#330099" BackColor="White"></ItemStyle>
					<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" BackColor="#990000"></HeaderStyle>
					<FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
					<Columns>
						<asp:HyperLinkColumn Text="Edit Contribution" DataNavigateUrlField="FAQID" DataNavigateUrlFormatString="EditFAQ.aspx?ID={0}"></asp:HyperLinkColumn>
						<asp:ButtonColumn Text="Delete Contribution" CommandName="Delete"></asp:ButtonColumn>
						<asp:HyperLinkColumn Text="View FAQ" DataNavigateUrlField="FAQID" DataNavigateUrlFormatString="../ShowFAQ.aspx?ID={0}"></asp:HyperLinkColumn>
						<asp:BoundColumn DataField="AbbreviatedAnswer" SortExpression="Answer" HeaderText="Answer"></asp:BoundColumn>
						<asp:TemplateColumn HeaderText="Category">
							<ItemTemplate>
								<asp:DropDownList id="contributionCategories" runat="server" Enabled="False" DataTextField="Name"
									DataValueField="CategoryID"></asp:DropDownList>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:BoundColumn DataField="DateCreated" SortExpression="DateCreated" HeaderText="Created On" DataFormatString="{0:d}"></asp:BoundColumn>
						<asp:TemplateColumn HeaderText="Approved">
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<ItemTemplate>
								<asp:CheckBox id=CheckBox2 runat="server" Enabled="False" Checked='<%# DataBinder.Eval(Container, "DataItem.Approved") %>'>
								</asp:CheckBox>
							</ItemTemplate>
						</asp:TemplateColumn>
					</Columns>
					<PagerStyle HorizontalAlign="Right" ForeColor="#330099" BackColor="#FFFFCC" Mode="NumericPages"></PagerStyle>
				</asp:DataGrid><asp:Label Runat="server" ID="noContributionsMessage" Font-Italic="True">You have not contributed to any FAQs.</asp:Label></P>
		</form>
		<P></P>
		</FORM>
	</body>
</HTML>
